﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using TecBaseObjects.Base;

namespace TecBaseObjects.Objects {
    
    public class AbrLiefRowObj : MyBaseModel {

        #region Members

        private string kunde;
        private string project;
        private DateTime bestellDatum;
        private string bestellNummer;
        private string invoiceAr;
        private string invoiceEr;
        private int auftragNummer;
        private string produkt;
        private string einheit;
        private double menge;
        private double einzelPreis;
        private double summePreis;
        private double ekVorSK;
        private string lieferant;

        #endregion

        #region Contructor

        public AbrLiefRowObj() {

        }

        #endregion

        #region Properties

        private bool inUse;
        public bool InUse {
            get { return this.inUse; }
            set {
                if(this.inUse == value) {
                    return;
                }
                this.inUse = value;
                OnPropertyChanged(() => InUse);
            }
        }

        private int rowNumber;
        public int RowNumber {
            get { return this.rowNumber; }
            set { this.rowNumber = value; }
        }

        [DataMember]
        public string Kunde {
            get { return this.kunde; }
            set {
                if(this.kunde == value) {
                    return;
                }
                this.kunde = value;
                OnPropertyChanged(() => Kunde);
            }
        }

        [DataMember]
        public string Project {
            get { return this.project; }
            set {
                if(this.project == value) {
                    return;
                }
                this.project = value;
                OnPropertyChanged(() => Project);
            }
        }

        [DataMember]
        public DateTime BestellDatum {
            get { return this.bestellDatum; }
            set {
                if(this.bestellDatum == value) {
                    return;
                }
                this.bestellDatum = value;
                OnPropertyChanged(() => BestellDatum);
            }
        }

        [DataMember]
        public string BestellNummer {
            get { return this.bestellNummer; }
            set {
                if(this.bestellNummer == value) {
                    return;
                }
                this.bestellNummer = value;
                OnPropertyChanged(() => BestellNummer);
            }
        }

        [DataMember]
        public string InvoiceAr {
            get { return this.invoiceAr; }
            set {
                if(this.invoiceAr == value) {
                    return;
                }
                this.invoiceAr = value;
                OnPropertyChanged(() => InvoiceAr);
            }
        }

        [DataMember]
        public string InvoiceEr {
            get { return this.invoiceEr; }
            set {
                if(this.invoiceEr == value) {
                    return;
                }
                this.invoiceEr = value;
                OnPropertyChanged(() => InvoiceEr);
            }
        }

        [DataMember]
        public int AuftragNummer {
            get { return this.auftragNummer; }
            set {
                if(this.auftragNummer == value) {
                    return;
                }
                this.auftragNummer = value;
                OnPropertyChanged(() => AuftragNummer);
            }
        }

        [DataMember]
        public string Produkt {
            get { return this.produkt; }
            set {
                if(this.produkt == value) {
                    return;
                }
                this.produkt = value;
                OnPropertyChanged(() => Produkt);
            }
        }

        [DataMember]
        public string Einheit {
            get { return this.einheit; }
            set {
                if(this.einheit == value) {
                    return;
                }
                this.einheit = value;
                OnPropertyChanged(() => Einheit);
            }
        }

        [DataMember]
        public double Menge {
            get { return this.menge; }
            set {
                if(this.menge == value) {
                    return;
                }
                this.menge = value;
                OnPropertyChanged(() => Menge);
            }
        }

        [DataMember]
        public double EinzelPreis {
            get { return this.einzelPreis; }
            set {
                if(this.einzelPreis == value) {
                    return;
                }
                this.einzelPreis = value;
                OnPropertyChanged(() => EinzelPreis);
            }
        }

        [DataMember]
        public double SummePreis {
            get { return this.summePreis; }
            set {
                if(this.summePreis == value) {
                    return;
                }
                this.summePreis = value;
                OnPropertyChanged(() => SummePreis);
            }
        }

        [DataMember]
        public double EkVorSK {
            get { return this.ekVorSK; }
            set {
                if(this.ekVorSK == value) {
                    return;
                }
                this.ekVorSK = value;
                OnPropertyChanged(() => EkVorSK);
            }
        }

        [DataMember]
        public string Lieferant {
            get { return this.lieferant; }
            set {
                if (this.lieferant == value) {
                    return;
                }
                this.lieferant = value;
                OnPropertyChanged(() => Lieferant);
            }
        }

        #endregion

        #region Overides

        public override string ToString() {
            return this.Kunde + this.Project + " " + this.Produkt;
        }

        #endregion

    }
}
